/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.bll;

import entity.EnrollEvent;
import java.util.List;
import model.dal.EnrollEventDAL;

/**
 *
 * @author Hailk_c00639
 */
public class EnrollEventBLL {

    EnrollEventDAL enrollEventDAL = new EnrollEventDAL();

    public List<EnrollEvent> getAllEnrollEvent() {
        return enrollEventDAL.getAllEnrollEvent();
    }

    public boolean insertEnroll(EnrollEvent enrollEvent) {
        return enrollEventDAL.insertEnroll(enrollEvent);
    }

    public boolean updateEnroll(EnrollEvent enrollEvent) {
        return enrollEventDAL.updateEnroll(enrollEvent);
    }

    public boolean deleteEnrollEventByID(int enrollEventID) {
        try {
            enrollEventDAL.deleteEnrollEventByID(enrollEventID);

            return true;
        } catch (Exception e) {
            return false;
        }
    }

    public EnrollEvent searchEnrollEventByID(int enrollEventID) {
        return enrollEventDAL.searchEnrollEventByID(enrollEventID);
    }

    public EnrollEvent searchEnrollEventByEventID(int eventID) {
        return enrollEventDAL.searchEnrollEventByEventID(eventID);
    }

    public EnrollEvent searchEnrollEventByAccountID(int accountID) {
        return enrollEventDAL.searchEnrollEventByAccountID(accountID);
    }
}
